<template>
  <div class="root">
    <a href="#/find">发现音乐</a>
    <a href="#/my">我的音乐</a>
    <a href="#/part">朋友音乐</a>
    <router-view></router-view>
    <hr />
    <router-link to="/find">发现音乐</router-link>
    <router-link to="/my/青花瓷">我的</router-link>
    <router-link to="/part?name=小白">朋友</router-link>
    <button @click="btnFn">朋友</button>
  </div>
</template>

<script>
export default {
  methods: {
    btnFn() {
      this.$router.push({
        name: "myFriend",
        params: {
          book: "西游记",
        },
        query: {
          flower: "送你一朵小红花",
        },
      });
    },
  },
};
</script>


<style lang="less" scoped>
.root {
  width: 300px;
}
.root a {
  display: inline-block;
  width: 33%;
  height: 35px;
  line-height: 35px;
  text-align: center;
  background: #333;
  color: #fff;
  text-decoration: none;
}
.root a:hover {
  background: rgb(139, 138, 138);
}
</style>
